<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<%
if(Integer.parseInt(request.getParameter("num")) == 0){
	if( request.getParameter("su1").equals(null)  || request.getParameter("su1").equals("")){
		
	%>
	<script type="text/javascript">
		alert("입력해라");
		history.go(-1);
	</script>
	<%
	}
	else if( request.getParameter("su2").equals(null)  || request.getParameter("su2").equals("")){
	%>
		<script type="text/javascript">
		alert("입력해라");
		history.go(-1);
	</script>
	<%
	}
	else{
		int su1 = Integer.parseInt(request.getParameter("su1"));
		int su2 = Integer.parseInt(request.getParameter("su2"));
		if( su1>su2 ){
			int temp = 0;
			temp = su1;
			su1 = su2;
			su2 = temp;
		}
		for(int i = su1; i < su2; i++){
			if(i % 3 == 0 ){
				out.print(i);
			}
		}
	}
}
else{
	out.print("아ㄴ님");
}
%>

</body>
</html>